<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>参与人员详细信息</title>
<%@ include file="/common/meta.jsp"%>
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript" src="${res}/js/autodisckey/autodisckey.js"></script>

<style type="text/css">
	.input_width { width:130px }
	.select_width { width:143px }
	.table_td td {border:0}
	.long_input{ width:642px }
    .selectWidth4{width:616px;}
    textarea{overflow-y:   auto;
			overflow-x:hidden;
			}
</style>
<script type="text/javascript">
var type = "${param.type}";
var parentTable = parent.$("#"+"${param.parentTab}");	//父页面的表格
var selectRadio = $();									//父页面选中的单选框
var selectTr = $();										//父页面选中的行

if(type=="edit") {
	selectRadio = parentTable.find(":radio:checked");
	selectTr = selectRadio.parents("tr");
}

$(function(){
	$("#fragment-tab1 :text,#fragment-tab1 [type='date']").addClass("input_width");
	$("#fragment-tab1 select").addClass("select_width");
	
	var submitpsn=selectTr.find("[name$='submit_psn']");//标示是否是申报人
	
	if(type=="edit"){
		
		$("input:not(:radio:button)").each(function(){

			var id=$(this).attr("name");
			if(id==null || id=="")
				return true;
			
			var parentObj=selectTr.find("[name$='/"+id+"']");
			var value="";
			if(parentObj.is("span"))
				value=parentObj.text();
			else
				value=parentObj.val();
			//if($(this).is("input"))//初始化input框 不包括radio
				$(this).val(value);
		});
		
		for(var i=1; i<=3;i++) {
			var id=$("#textarea0"+i).attr("name");
			if(id==null || id=="")
				return true;
			
			var parentObj=selectTr.find("[name$='/"+id+"']");
			var value="";
			if(parentObj.is("span"))
				value=parentObj.text();
			else
				value=parentObj.val();
			//if($(this).is("input"))//初始化input框 不包括radio
			$("#textarea0"+i).html(value);
		}
		
		$(":radio").each(function(){//初始化radio框
			var name=$(this).attr("name");
		
			
			var value=$("[name='"+name+"_value']").val();
			if($(this).val()==value)
				$(this).attr("checked",true);
			
		});
		//if(submitpsn.length>0 && submitpsn.val()=="1"){//如果是申报人
			$("input,select").each(function(){
				if(!$(this).attr("class")||$(this).attr("class").indexOf("notdisabled")==-1)
					$(this).attr("disabled","true");
			});
			$("a,img").removeAttr("onclick");
			$(".color_red").css("display","none");
			$("img").css("display","none");
			parent.$("#TB_ajaxWindowTitle").html("查看申请人信息");
		//}
		
	}
});

</script>

</head>
<body>

	 <div id="tabnav">
		<ul>
			<li class="down" id="tab1" onclick="changeTab(this.id)">
			    <a href="###"><span>立项情况</span></a>
			</li>
			<li id="tab2" onclick="changeTab(this.id)">
			    <a href="###"><span>项目内容</span></a>
			</li>
		</ul>
	</div>
	<div class="tab_box" id="fragment-tab1">
	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="li_1">
          <td align="right" style="width: 170px;"><span class="color_red">*</span>项目名称:</td>
          <td colspan='3'>
			  <input name='plan_name' class='input_text required' 
			  style="width: 650px;"  label='项目名称'
			  value="" >
		  </td>
      </tr>
      <tr class="li_2">
          <td align="right"><span class="color_red">*</span>合作单位名称:</td>
		  <td>
			  <input name='prp_name' class='input_text required' 
			  style="width: 200px;" label='合作单位'
			  value="" >
		  </td>
		  <td align="right"><span class="color_red">*</span>合作形式:</td>
		  <td>
			  <input name='dept' class='input_text required' 
			  style="width: 200px;" label='合作形式'
			  value="" >
		  </td>
      </tr>
       <tr class="li_1">
          <td align="right"><span class="color_red">*</span>合作协议签订时间:</td>
		  <td>
			  <cpt:date id="year"  value="" className="input_text tableflag required date" size="43" label="合作协议签订时间" name="year"></cpt:date> 
		  </td>
		  <td align="right" width="180px"><span class="color_red">*</span>项目资金投入金额:</td>
		  <td>
			  <input name='amt' class='input_text required' 
			  style="width: 200px; text-align: right;" label='项目资金投入金额' onfocus="InitInput.setNumber(this,7,4,2)"
			  value="" >万元
		  </td>
      </tr>
       <tr class="li_2">
          <td align="right"><span class="color_red">*</span>实际支付合作方金额:</td>
		  <td colspan='3'>
			  <input name='actually_amt' class='input_text required' 
			  style="width: 200px; text-align: right;" label='实际支付合作方金额' onfocus="InitInput.setNumber(this,7,4,2)"
			  value="" >万元
		  </td>
      </tr>
   </table>
   </div>
   <div class="tab_box" id="fragment-tab2" style="display:none">
   <table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>项目执行情况:</strong></td>
      </tr>
      <tr class="li_2">
          <td>
          <pre id="textarea01"  name='prp_imple'></pre>
		  </td>
      </tr>
      <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>项目经济效益:</strong></td>
      </tr>
      <tr class="li_2">
          <td>
          <pre id="textarea02"  name='prp_ebenefit'></pre>
	      </td>
      </tr>
       <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>项目社会效益:</strong></td>
      </tr>
      <tr class="li_2">
          <td>
          	<pre id="textarea03"  name='prp_sbenefit'></pre>
	      </td>
      </tr>
    </table>
	</div>
	<table width="100%" align="center">
		<tr>
			<td>
				&nbsp;<input type="button" id="cancel" class="button_01 notdisabled" value="关闭" onclick="parent.tb_remove();">
			</td>
		</tr>
	</table>
	<br />
	<br />
</body>
</html>